package com.np.rtmpdump5;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    private BitmapLive bitmapLive;
    private String url = "rtmp://192.168.2.156:10035/live/i6YJfdHSg?sign=ieL1BOHIgz";
    //private String url = "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_3546379957831915_58459438&key=56cc8bc5a338f4c3d9c5da8a46fe501a&schedule=rtmp&pflag=1";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.bPush).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                bitmapLive = new BitmapLive();
                bitmapLive.startLive(url);
            }
        });
    }

    public void stopLive(View view) {
        bitmapLive.close();
    }
}